#pragma once

#include <string>
#include <memory>
#include <boost/system/error_code.hpp>

class IConnection;

class IAcceptorHandler
{
public:
	virtual void onAccepted(const boost::system::error_code&) = 0;
protected:
	virtual ~IAcceptorHandler(){};
};

class IAcceptor
{
public:
	virtual void openBindAndListen(const std::string& address, const std::string& port) = 0;
	virtual void asyncAccept(std::shared_ptr<IConnection>& connection, IAcceptorHandler& accept) = 0;
	virtual ~IAcceptor(){};
};